package com.lute.model;

import java.text.SimpleDateFormat;
import java.util.GregorianCalendar;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.cfg.AnnotationConfiguration;
import org.hibernate.tool.hbm2ddl.SchemaExport;

public class LuteTestAdamTestData {
		/**
		 * @param args
		 */
		public static void main(String[] args) {
			
			@SuppressWarnings("deprecation")
			AnnotationConfiguration config = new AnnotationConfiguration();

			// adding classes to config object
			config.addAnnotatedClass(Admin.class);
			config.addAnnotatedClass(Approver.class);
			config.addAnnotatedClass(BusinessUnit.class);
			config.addAnnotatedClass(Client.class);
			config.addAnnotatedClass(ClientAccountingPeriod.class);
			config.addAnnotatedClass(ClientAdmin.class);
			config.addAnnotatedClass(ClientAdminProfile.class);
			config.addAnnotatedClass(ClientCategory.class);
			config.addAnnotatedClass(ClientProfile.class);
			config.addAnnotatedClass(CompanyCategory.class);
			config.addAnnotatedClass(Employee.class);
			config.addAnnotatedClass(EmployeeAccountingPeriod.class);
			config.addAnnotatedClass(EmployeeAccountingPeriodState.class);
			config.addAnnotatedClass(EmployeeEntry.class);
			config.addAnnotatedClass(EmployeeProfile.class);
			config.addAnnotatedClass(NotepadEntry.class);
			config.addAnnotatedClass(Position.class);
			config.addAnnotatedClass(Role.class);
			config.addAnnotatedClass(User.class);
			
			
			// telling hibernate to configure itself using XML file stored in build classpath
			config.configure("hibernate.cfg.xml");
			
			// update schema configured in XML file
			new SchemaExport(config).create(true, true);
			
			SessionFactory factory = config.buildSessionFactory();
			Session hibernateSession = factory.getCurrentSession();
			hibernateSession.beginTransaction();
			
			/*
			 * CLIENT CATEGORY + COMPANY CATEGORY
			 */
			ClientCategory clientCatBusinessTrip = new ClientCategory();
			clientCatBusinessTrip.setName(ClientHoursCategory.BUSINESSTRIP.toString());
			
			ClientCategory clientCatContractorTimeOff = new ClientCategory();
			clientCatContractorTimeOff.setName(ClientHoursCategory.CONTRACTORTIMEOFF.toString());
			
			ClientCategory clientCatNormalTime = new ClientCategory();
			clientCatNormalTime.setName(ClientHoursCategory.NORMALTIME.toString());
			
			ClientCategory clientCatOverTime = new ClientCategory();
			clientCatOverTime.setName(ClientHoursCategory.OVERTIME.toString());
			
			ClientCategory clientCatTraining = new ClientCategory();
			clientCatTraining.setName(ClientHoursCategory.TRAINING.toString());
			

			
			
			CompanyCategory companyCategory1 = new CompanyCategory();
			companyCategory1.setName(CompanyHoursCategory.NATIONAL_HOLIDAY.toString());
			
			CompanyCategory companyCategory2 = new CompanyCategory();
			companyCategory2.setName(CompanyHoursCategory.BUSINESS_TRIP_CLIENT.toString());
			
			CompanyCategory companyCategory3 = new CompanyCategory();
			companyCategory3.setName(CompanyHoursCategory.BUSINESS_TRIP_COMPANY.toString());
			
			CompanyCategory companyCategory4 = new CompanyCategory();
			companyCategory4.setName(CompanyHoursCategory.MATERNITY_LEAVE.toString());
			
			CompanyCategory companyCategory5 = new CompanyCategory();
			companyCategory5.setName(CompanyHoursCategory.OVERTIME_CLIENT.toString());
			
			CompanyCategory companyCategory6 = new CompanyCategory();
			companyCategory6.setName(CompanyHoursCategory.OVERTIME_COMPANY.toString());
			
			CompanyCategory companyCategory7 = new CompanyCategory();
			companyCategory7.setName(CompanyHoursCategory.PATERNITY_LEAVE.toString());
			
			CompanyCategory companyCategory8 = new CompanyCategory();
			companyCategory8.setName(CompanyHoursCategory.SICK_LEAVE.toString());
			
			CompanyCategory companyCategory9 = new CompanyCategory();
			companyCategory9.setName(CompanyHoursCategory.TRAINING_CLIENT.toString());
			
			CompanyCategory companyCategory10 = new CompanyCategory();
			companyCategory10.setName(CompanyHoursCategory.TRAINING_COMPANY.toString());
			
			CompanyCategory companyCategory11 = new CompanyCategory();
			companyCategory11.setName(CompanyHoursCategory.UNDEFINED.toString());
			
			CompanyCategory companyCategory12 = new CompanyCategory();
			companyCategory12.setName(CompanyHoursCategory.VACATION.toString());
			
			CompanyCategory companyCategory13 = new CompanyCategory();
			companyCategory13.setName(CompanyHoursCategory.WORK_CLIENT.toString());
			
			CompanyCategory companyCategory14 = new CompanyCategory();
			companyCategory14.setName(CompanyHoursCategory.WORK_COMPANY.toString());
			
			companyCategory1.getClientCategories().add(clientCatContractorTimeOff);
			companyCategory2.getClientCategories().add(clientCatBusinessTrip);
			companyCategory3.getClientCategories().add(clientCatContractorTimeOff);
			companyCategory4.getClientCategories().add(clientCatContractorTimeOff);
			companyCategory5.getClientCategories().add(clientCatOverTime);
			companyCategory6.getClientCategories().add(clientCatContractorTimeOff);
			companyCategory7.getClientCategories().add(clientCatContractorTimeOff);
			companyCategory8.getClientCategories().add(clientCatContractorTimeOff);
			companyCategory9.getClientCategories().add(clientCatTraining);
			companyCategory10.getClientCategories().add(clientCatContractorTimeOff);
			companyCategory11.getClientCategories().add(clientCatContractorTimeOff);
			companyCategory12.getClientCategories().add(clientCatContractorTimeOff);
			companyCategory13.getClientCategories().add(clientCatNormalTime);
			companyCategory14.getClientCategories().add(clientCatContractorTimeOff);
			
			clientCatBusinessTrip.getCompanyCategories().add(companyCategory2);
			clientCatNormalTime.getCompanyCategories().add(companyCategory13);
			clientCatOverTime.getCompanyCategories().add(companyCategory5);
			clientCatTraining.getCompanyCategories().add(companyCategory9);
			
			clientCatContractorTimeOff.getCompanyCategories().add(companyCategory1);
			clientCatContractorTimeOff.getCompanyCategories().add(companyCategory3);
			clientCatContractorTimeOff.getCompanyCategories().add(companyCategory4);
			clientCatContractorTimeOff.getCompanyCategories().add(companyCategory6);
			clientCatContractorTimeOff.getCompanyCategories().add(companyCategory7);
			clientCatContractorTimeOff.getCompanyCategories().add(companyCategory8);
			clientCatContractorTimeOff.getCompanyCategories().add(companyCategory10);
			clientCatContractorTimeOff.getCompanyCategories().add(companyCategory11);
			clientCatContractorTimeOff.getCompanyCategories().add(companyCategory12);
			clientCatContractorTimeOff.getCompanyCategories().add(companyCategory14);
			
			hibernateSession.save(clientCatBusinessTrip);
			hibernateSession.save(clientCatContractorTimeOff);
			hibernateSession.save(clientCatNormalTime);
			hibernateSession.save(clientCatOverTime);
			hibernateSession.save(clientCatTraining);
			hibernateSession.save(companyCategory1);
			hibernateSession.save(companyCategory2);
			hibernateSession.save(companyCategory3);
			hibernateSession.save(companyCategory4);
			hibernateSession.save(companyCategory5);
			hibernateSession.save(companyCategory6);
			hibernateSession.save(companyCategory7);
			hibernateSession.save(companyCategory8);
			hibernateSession.save(companyCategory9);
			hibernateSession.save(companyCategory10);
			hibernateSession.save(companyCategory11);
			hibernateSession.save(companyCategory12);
			hibernateSession.save(companyCategory13);
			hibernateSession.save(companyCategory14);
			/*
			 * END OF -------------- CLIENT CATEGORY + COMPANY CATEGORY
			 */


			/*
			 * ROLE
			 */
			Role roleEmployeeTest = new Role();
			roleEmployeeTest.setName("employeeTest");
			hibernateSession.save(roleEmployeeTest);

			Role roleApprover = new Role();
			roleApprover.setName("approver");
			hibernateSession.save(roleApprover);

			Role roleClientAdmin = new Role();
			roleClientAdmin.setName("clientAdmin");
			hibernateSession.save(roleClientAdmin);
				
			Role roleAdmin = new Role();
			roleAdmin.setName("admin");
			hibernateSession.save(roleAdmin);
				
			Role roleEmployee = new Role();
			roleEmployee.setName("employee");
			hibernateSession.save(roleEmployee);
			/*
			 * END OF -------------- ROLE
			 */


			/*
			 * POSITION
			 */
			Position position1 = new Position();
			position1.setName(PositionName.BUSINESS_ANALYST.toString());
			position1.setCreativity_percentage(PositionName.BUSINESS_ANALYST.getPercentage());
			hibernateSession.save(position1);
			
			Position position2 = new Position();
			position2.setName(PositionName.DEVELOPER.toString());
			position2.setCreativity_percentage(PositionName.DEVELOPER.getPercentage());
			hibernateSession.save(position2);

			Position position3 = new Position();
			position3.setName(PositionName.QA.toString());
			position3.setCreativity_percentage(PositionName.QA.getPercentage());
			hibernateSession.save(position3);
			
			Position position4 = new Position();
			position4.setName(PositionName.SUPPORT.toString());
			position4.setCreativity_percentage(PositionName.SUPPORT.getPercentage());
			hibernateSession.save(position4);

			/*
			 * END OF -------------- POSITION
			 */
			

			/*
			 * CLIENT
			 */
			Client client1 = new Client();
			client1.setName("Client1");
			hibernateSession.save(client1);
				
			Client client2 = new Client();
			client2.setName("Client2");
			hibernateSession.save(client2);
				
			/*
			 * END OF -------------- CLIENT
			 */
			
			
			
			/*
			 * BUSINESS UNIT
			 */
			BusinessUnit businessUnit1 = new BusinessUnit();
			businessUnit1.setName("Client1 BU1");
			businessUnit1.setClient(client1);
			client1.getBusiness_units().add(businessUnit1);
			hibernateSession.save(businessUnit1);
			
			BusinessUnit businessUnit2 = new BusinessUnit();
			businessUnit2.setName("Client1 BU2");
			businessUnit2.setClient(client1);
			client1.getBusiness_units().add(businessUnit2);
			hibernateSession.save(businessUnit2);
			
			BusinessUnit businessUnit3 = new BusinessUnit();
			businessUnit3.setName("Client2 BU1");
			businessUnit3.setClient(client2);
			client2.getBusiness_units().add(businessUnit3);
			hibernateSession.save(businessUnit3);
			/*
			 * END OF -------------- BUSINESS UNIT
			 */

			
			/*
			 * CLIENT ADMIN 1st + CLIENT ADMIN PROFILE
			 */
			ClientAdmin clientAdmin1 =  new ClientAdmin();
			clientAdmin1.setLogin("alu");
			clientAdmin1.setRole(roleClientAdmin);
			clientAdmin1.setEmail("adam.ludwikowski@gmail.com");
			clientAdmin1.setFirst_name("Adam");
			clientAdmin1.setLast_name("Ludwikowski");

			ClientAdmin clientAdmin2 =  new ClientAdmin();
			clientAdmin2.setLogin("rmi");
			clientAdmin2.setRole(roleClientAdmin);
			clientAdmin2.setEmail("rafalmigalski@gmail.com");
			clientAdmin2.setFirst_name("Rafal");
			clientAdmin2.setLast_name("Migalski");
			
			ClientAdminProfile clientAdminProfile1 = new ClientAdminProfile();
			clientAdminProfile1.setEmail("adam.ludwikowski@gmail.com");
			clientAdminProfile1.setClientAdmin(clientAdmin1);
			clientAdminProfile1.getClients().add(client1);
			clientAdminProfile1.getClients().add(client2);
			
			ClientAdminProfile clientAdminProfile2 = new ClientAdminProfile();
			clientAdminProfile2.setEmail("rafalmigalski@gmail.com");
			clientAdminProfile2.setClientAdmin(clientAdmin2);
			clientAdminProfile2.getClients().add(client1);
			
			hibernateSession.save(clientAdmin1);
			hibernateSession.save(clientAdmin2);
			hibernateSession.save(clientAdminProfile1);
			hibernateSession.save(clientAdminProfile2);
			/*
			 * END OF -------------- CLIENT ADMIN + CLIENT ADMIN PROFILE
			 */

			
		/*
		 * EMPLOYEE 1st
		 */
			
			/*
			 * APPROVER1 TEAM 
			 */
			Employee employee1 = new Employee();
			employee1.setEmail("bartosz.szewczyk.81@gmail.com");
			employee1.setFirst_name("Bartosz");
			employee1.setLast_name("Szewczyk");
			employee1.setLogin("lute");
			employee1.setRole(roleEmployee);
			hibernateSession.save(employee1);
			
			
			Employee employee2 = new Employee();
			employee2.setEmail("inzt_uk86rct@iqihzc.com");
			employee2.setFirst_name("Yopp");
			employee2.setLast_name("Persson");
			employee2.setLogin("yopp");
			employee2.setRole(roleEmployee);
			hibernateSession.save(employee2);
			/*
			 * END OF -------------- APPROVER1 TEAM
			 */
				
			
			
			/*
			 * APPROVER2 TEAM 
			 */
			Employee employee3 = new Employee();
			employee3.setEmail("ueh210v4@ol7wztd.com");
			employee3.setFirst_name("Yonker");
			employee3.setLast_name("Paterson");
			employee3.setLogin("yonkie");
			employee3.setRole(roleEmployee);
			hibernateSession.save(employee3);

			Employee employee4 = new Employee();
			employee4.setEmail("ot87vocaxk2@yz0h4f.com");
			employee4.setFirst_name("Zabriskie");
			employee4.setLast_name("Hansson");
			employee4.setLogin("zabrie");
			employee4.setRole(roleEmployee);
			hibernateSession.save(employee4);

			Employee employee5 = new Employee();
			employee5.setEmail("crjr5ecrygd1vx@unf8pgsz7.com");
			employee5.setFirst_name("Yardley");
			employee5.setLast_name("Robinson");
			employee5.setLogin("yardie");
			employee5.setRole(roleEmployee);
			hibernateSession.save(employee5);

			Employee employee6 = new Employee();
			employee6.setEmail("6oh_k@zb29rtbu.com");
			employee6.setFirst_name("Zabriskie");
			employee6.setLast_name("Murray");
			employee6.setLogin("zab");
			employee6.setRole(roleEmployee);
			hibernateSession.save(employee6);

			Employee employee7 = new Employee();
			employee7.setEmail("2coj1-y77c.n48u@fz8mxgay89.com");
			employee7.setFirst_name("Zacharias");
			employee7.setLast_name("Green");
			employee7.setLogin("zachary");
			employee7.setRole(roleEmployee);
			hibernateSession.save(employee7);
			/*
			 * END OF -------------- APPROVER2 TEAM
			 */

			/*
			 * APPROVER3 TEAM 
			 */
			Employee employee8 = new Employee();
			employee8.setEmail("a2p1p@rbyf-k-5.com");
			employee8.setFirst_name("Yost");
			employee8.setLast_name("Jacobsen");
			employee8.setLogin("yostjac");
			employee8.setRole(roleEmployee);
			hibernateSession.save(employee8);

			Employee employee9 = new Employee();
			employee9.setEmail("gd72iux@uf3v5zs-dszs.com");
			employee9.setFirst_name("Ziegler");
			employee9.setLast_name("Williams");
			employee9.setLogin("ziegi");
			employee9.setRole(roleEmployee);
			hibernateSession.save(employee9);

			Employee employee10 = new Employee();
			employee10.setEmail("aj4fi@bebndh.com");
			employee10.setFirst_name("Zillgitt");
			employee10.setLast_name("Johansson");
			employee10.setLogin("ziggit");
			employee10.setRole(roleEmployee);
			hibernateSession.save(employee10);
			/*
			 * END OF -------------- APPROVER3 TEAM
			 */

			/*
			 * APPROVER4 TEAM 
			 */
			Employee employee11 = new Employee();
			employee11.setEmail("01rtjxk6@p0lob5duagui.com");
			employee11.setFirst_name("Ziemba");
			employee11.setLast_name("Karlsen");
			employee11.setLogin("aneta");
			employee11.setRole(roleEmployee);
			hibernateSession.save(employee11);

			Employee employee12 = new Employee();
			employee12.setEmail("r_6sn9156wskd28@ntkl6yny38.com");
			employee12.setFirst_name("Zufeldt");
			employee12.setLast_name("Walker");
			employee12.setLogin("zuf");
			employee12.setRole(roleEmployee);
			hibernateSession.save(employee12);

			Employee employee13 = new Employee();
			employee13.setEmail("s08fo7_7g8u@0ydq9hf3uzb6.com");
			employee13.setFirst_name("Zellner");
			employee13.setLast_name("Jensen");
			employee13.setLogin("zelmer");
			employee13.setRole(roleEmployee);
			hibernateSession.save(employee13);

			Employee employee14 = new Employee();
			employee14.setEmail("ihte8qx5l@2ffz-luskiw.com");
			employee14.setFirst_name("Yorke");
			employee14.setLast_name("Pettersson");
			employee14.setLogin("york");
			employee14.setRole(roleEmployee);
			hibernateSession.save(employee14);

			Employee employee15 = new Employee();
			employee15.setEmail("68-nv.hc2pkh@texe897.com");
			employee15.setFirst_name("Yarnes");
			employee15.setLast_name("Mitchell");
			employee15.setLogin("yami");
			employee15.setRole(roleEmployee);
			hibernateSession.save(employee15);
			
			
			/*
			 * END OF -------------- APPROVER4 TEAM
			 */
			
		/*
		 * END OF -------------- EMPLOYEE
		 */
				
			/*
			 * APPROVER
			 */
			Approver approver1 = new Approver();
			approver1.setEmail("wco@euymgn.com");
			approver1.setFirst_name("Yount");
			approver1.setLast_name("Martin");
			approver1.setLogin("yo");
			approver1.setRole(roleApprover);
				
			Approver approver2 = new Approver();
			approver2.setEmail("p1le.@k33dr-dc.com");
			approver2.setFirst_name("Zook");
			approver2.setLast_name("Hagen");
			approver2.setLogin("zoha");
			approver2.setRole(roleApprover);

			Approver approver3 = new Approver();
			approver3.setEmail("id8r7uin0pyu@cw1q-o2dob7.com");
			approver3.setFirst_name("Yotsler");
			approver3.setLast_name("Carlsson");
			approver3.setLogin("yotka");
			approver3.setRole(roleApprover);

			Approver approver4 = new Approver();
			approver4.setEmail("ngip8@aw05c3.com");
			approver4.setFirst_name("Zabriskie");
			approver4.setLast_name("Larsen");
			approver4.setLogin("zabla");
			approver4.setRole(roleApprover);
			
			approver1.setReplacement(approver2);
			approver2.setReplacement(approver1);
			approver3.setReplacement(null);
			approver4.setReplacement(null);
			
			hibernateSession.save(approver1);
			hibernateSession.save(approver2);
			hibernateSession.save(approver3);
			hibernateSession.save(approver4);
			/*
			 * END OF -------------- APPROVER
			 */
			
			//SimpleDateFormat dateFormater = new SimpleDateFormat("yyyy-MM-dd");
			SimpleDateFormat dateFormater = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
			GregorianCalendar cal = new GregorianCalendar();
			dateFormater.setCalendar(cal);

			/*
			 * END OF -------------- EMPLOYEE ACCOUNTING PERIOD + EMPLOYEE
			 */
			EmployeeProfile employeeProfile1 = new EmployeeProfile();
			employeeProfile1.setEmployee(employee1);
			employeeProfile1.setApprover(null);
			employeeProfile1.setClient(client1);
			employeeProfile1.setBusinessUnit(businessUnit1);
			employeeProfile1.setEmail(employee1.getEmail());
			employeeProfile1.setPositions(position1);
			employeeProfile1.setEmploymentStatus(EmploymentStatusCategories.EMPLOYMENT_CONTRACT.toString());
			employeeProfile1.setBillingStartDate(new GregorianCalendar(2013,8,01));
			employeeProfile1.setBackgroundCheck(new GregorianCalendar(2013,07,31));
			employeeProfile1.setEmployeeCurrentState(EmployeeCurrentState.WORKING_FOR_CLIENT.toString());
			employeeProfile1.setStartWorking(new GregorianCalendar(2013,06,01));
			employeeProfile1.setWorkLifeLine(new GregorianCalendar(2013,06,01));
			employee1.setEmployeeProfil(employeeProfile1);

			
			EmployeeProfile employeeProfile2 = new EmployeeProfile();
			employeeProfile2.setEmployee(employee2);
			employeeProfile2.setApprover(null);
			employeeProfile2.setClient(client1);
			employeeProfile2.setBusinessUnit(businessUnit1);
			employeeProfile2.setEmail(employee2.getEmail());
			employeeProfile2.setPositions(position2);
			employeeProfile2.setEmploymentStatus(EmploymentStatusCategories.EMPLOYMENT_CONTRACT.toString());
			employeeProfile2.setBillingStartDate(new GregorianCalendar(2013,01,01));
			employeeProfile2.setBackgroundCheck(new GregorianCalendar(2013,03,31));
			employeeProfile2.setEmployeeCurrentState(EmployeeCurrentState.WORKING_FOR_CLIENT.toString());
			employeeProfile2.setStartWorking(new GregorianCalendar(2012,12,01));
			employeeProfile2.setWorkLifeLine(new GregorianCalendar(2013,12,01));
			employee2.setEmployeeProfil(employeeProfile2);
			
			EmployeeProfile employeeProfile3 = new EmployeeProfile();
			employeeProfile3.setEmployee(employee3);
			employeeProfile3.setApprover(null);
			employeeProfile3.setClient(client1);
			employeeProfile3.setBusinessUnit(businessUnit1);
			employeeProfile3.setEmail(employee3.getEmail());
			employeeProfile3.setPositions(position4);
			employeeProfile3.setEmploymentStatus(EmploymentStatusCategories.EMPLOYMENT_CONTRACT.toString());
			employeeProfile3.setBillingStartDate(new GregorianCalendar(2013,02,01));
			employeeProfile3.setBackgroundCheck(new GregorianCalendar(2013,02,24));
			employeeProfile3.setEmployeeCurrentState(EmployeeCurrentState.BENCHED.toString());
			employeeProfile3.setStartWorking(new GregorianCalendar(2012,01,01));
			employeeProfile3.setWorkLifeLine(new GregorianCalendar(2013,01,01));
			employee3.setEmployeeProfil(employeeProfile3);
			
			EmployeeProfile employeeProfile4 = new EmployeeProfile();
			employeeProfile4.setEmployee(employee4);
			employeeProfile4.setApprover(null);
			employeeProfile4.setClient(client1);
			employeeProfile4.setBusinessUnit(businessUnit1);
			employeeProfile4.setEmail(employee4.getEmail());
			employeeProfile4.setPositions(position3);
			employeeProfile4.setEmploymentStatus(EmploymentStatusCategories.EMPLOYMENT_CONTRACT.toString());
			employeeProfile4.setBillingStartDate(new GregorianCalendar(2013,05,10));
			employeeProfile4.setBackgroundCheck(new GregorianCalendar(2013,06,24));
			employeeProfile4.setEmployeeCurrentState(EmployeeCurrentState.WORKING_FOR_CLIENT.toString());
			employeeProfile4.setStartWorking(new GregorianCalendar(2012,04,01));
			employeeProfile4.setWorkLifeLine(new GregorianCalendar(2013,04,01));
			employee4.setEmployeeProfil(employeeProfile4);

			EmployeeProfile employeeProfile5 = new EmployeeProfile();
			employeeProfile5.setEmployee(employee5);
			employeeProfile5.setApprover(null);
			employeeProfile5.setClient(client1);
			employeeProfile5.setBusinessUnit(businessUnit1);
			employeeProfile5.setEmail(employee5.getEmail());
			employeeProfile5.setPositions(position1);
			employeeProfile5.setEmploymentStatus(EmploymentStatusCategories.EMPLOYMENT_CONTRACT.toString());
			employeeProfile5.setBillingStartDate(new GregorianCalendar(2013,8,01));
			employeeProfile5.setBackgroundCheck(new GregorianCalendar(2013,07,31));
			employeeProfile5.setEmployeeCurrentState(EmployeeCurrentState.WORKING_FOR_CLIENT.toString());
			employeeProfile5.setStartWorking(new GregorianCalendar(2013,06,01));
			employeeProfile5.setWorkLifeLine(new GregorianCalendar(2013,06,01));
			employee5.setEmployeeProfil(employeeProfile5);

			EmployeeProfile employeeProfile6 = new EmployeeProfile();
			employeeProfile6.setEmployee(employee6);
			employeeProfile6.setApprover(null);
			employeeProfile6.setClient(client1);
			employeeProfile6.setBusinessUnit(businessUnit1);
			employeeProfile6.setEmail(employee6.getEmail());
			employeeProfile6.setPositions(position4);
			employeeProfile6.setEmploymentStatus(EmploymentStatusCategories.CONTRACTUAL_EMPLOYEE.toString());
			employeeProfile6.setBillingStartDate(new GregorianCalendar(2011,02,30));
			employeeProfile6.setBackgroundCheck(new GregorianCalendar(2013,05,26));
			employeeProfile6.setEmployeeCurrentState(EmployeeCurrentState.BENCHED.toString());
			employeeProfile6.setStartWorking(new GregorianCalendar(2010,00,18));
			employeeProfile6.setWorkLifeLine(new GregorianCalendar(2010,00,18));
			employee6.setEmployeeProfil(employeeProfile6);

			EmployeeProfile employeeProfile7 = new EmployeeProfile();
			employeeProfile7.setEmployee(employee7);
			employeeProfile7.setApprover(null);
			employeeProfile7.setClient(client1);
			employeeProfile7.setBusinessUnit(null);
			employeeProfile7.setEmail(employee7.getEmail());
			employeeProfile7.setPositions(null);
			employeeProfile7.setEmploymentStatus(null);
			employeeProfile7.setBillingStartDate(null);
			employeeProfile7.setBackgroundCheck(null);
			employeeProfile7.setEmployeeCurrentState(EmployeeCurrentState.BENCHED.toString());
			employeeProfile7.setStartWorking(null);
			employeeProfile7.setWorkLifeLine(null);
			employee7.setEmployeeProfil(employeeProfile7);

			EmployeeProfile employeeProfile8 = new EmployeeProfile();
			employeeProfile8.setEmployee(employee8);
			employeeProfile8.setApprover(null);
			employeeProfile8.setClient(null);
			employeeProfile8.setBusinessUnit(null);
			employeeProfile8.setEmail(employee8.getEmail());
			employeeProfile8.setPositions(null);
			employeeProfile8.setEmploymentStatus(null);
			employeeProfile8.setBillingStartDate(null);
			employeeProfile8.setBackgroundCheck(null);
			employeeProfile8.setEmployeeCurrentState(EmployeeCurrentState.NOT_EMPLOYED.toString());
			employeeProfile8.setStartWorking(null);
			employeeProfile8.setWorkLifeLine(null);
			employee8.setEmployeeProfil(employeeProfile8);
			
			EmployeeProfile employeeProfile9 = new EmployeeProfile();
			employeeProfile9.setEmployee(employee9);
			employeeProfile9.setApprover(null);
			employeeProfile9.setClient(client1);
			employeeProfile9.setBusinessUnit(businessUnit2);
			employeeProfile9.setEmail(employee9.getEmail());
			employeeProfile9.setPositions(position2);
			employeeProfile9.setEmploymentStatus(EmploymentStatusCategories.CONTRACTUAL_EMPLOYEE.toString());
			employeeProfile9.setBillingStartDate(new GregorianCalendar(2008,6,14));
			employeeProfile9.setBackgroundCheck(new GregorianCalendar(2008,6,14));
			employeeProfile9.setEmployeeCurrentState(EmployeeCurrentState.BENCHED.toString());
			employeeProfile9.setStartWorking(new GregorianCalendar(2007,4,14));
			employeeProfile9.setWorkLifeLine(new GregorianCalendar(2007,4,14));
			employee9.setEmployeeProfil(employeeProfile9);
			
			EmployeeProfile employeeProfile10 = new EmployeeProfile();
			employeeProfile10.setEmployee(employee10);
			employeeProfile10.setApprover(null);
			employeeProfile10.setClient(client1);
			employeeProfile10.setBusinessUnit(businessUnit2);
			employeeProfile10.setEmail(employee10.getEmail());
			employeeProfile10.setPositions(position3);
			employeeProfile10.setEmploymentStatus(EmploymentStatusCategories.CONTRACTUAL_EMPLOYEE.toString());
			employeeProfile10.setBillingStartDate(new GregorianCalendar(2011,7,8));
			employeeProfile10.setBackgroundCheck(new GregorianCalendar(2011,7,8));
			employeeProfile10.setEmployeeCurrentState(EmployeeCurrentState.WORKING_FOR_CLIENT.toString());
			employeeProfile10.setStartWorking(new GregorianCalendar(2011,3,11));
			employeeProfile10.setWorkLifeLine(new GregorianCalendar(2011,3,11));
			employee10.setEmployeeProfil(employeeProfile10);
			
			EmployeeProfile employeeProfile11 = new EmployeeProfile();
			employeeProfile11.setEmployee(employee11);
			employeeProfile11.setApprover(null);
			employeeProfile11.setClient(client2);
			employeeProfile11.setBusinessUnit(businessUnit3);
			employeeProfile11.setEmail(employee11.getEmail());
			employeeProfile11.setPositions(position1);
			employeeProfile11.setEmploymentStatus(EmploymentStatusCategories.CONTRACTUAL_EMPLOYEE.toString());
			employeeProfile11.setBillingStartDate(new GregorianCalendar(2012,7,10));
			employeeProfile11.setBackgroundCheck(new GregorianCalendar(2012,7,10));
			employeeProfile11.setEmployeeCurrentState(EmployeeCurrentState.WORKING_FOR_CLIENT.toString());
			employeeProfile11.setStartWorking(new GregorianCalendar(2012,3,02));
			employeeProfile11.setWorkLifeLine(new GregorianCalendar(2012,3,02));
			employee11.setEmployeeProfil(employeeProfile11);

			EmployeeProfile employeeProfile12 = new EmployeeProfile();
			employeeProfile12.setEmployee(employee12);
			employeeProfile12.setApprover(null);
			employeeProfile12.setClient(null);
			employeeProfile12.setBusinessUnit(null);
			employeeProfile12.setEmail(employee12.getEmail());
			employeeProfile12.setPositions(null);
			employeeProfile12.setEmploymentStatus(null);
			employeeProfile12.setBillingStartDate(null);
			employeeProfile12.setBackgroundCheck(null);
			employeeProfile12.setEmployeeCurrentState(EmployeeCurrentState.NOT_EMPLOYED.toString());
			employeeProfile12.setStartWorking(null);
			employeeProfile12.setWorkLifeLine(null);
			employee12.setEmployeeProfil(employeeProfile12);
			
			EmployeeProfile employeeProfile13 = new EmployeeProfile();
			employeeProfile13.setEmployee(employee13);
			employeeProfile13.setApprover(null);
			employeeProfile13.setClient(client2);
			employeeProfile13.setBusinessUnit(businessUnit3);
			employeeProfile13.setEmail(employee13.getEmail());
			employeeProfile13.setPositions(position1);
			employeeProfile13.setEmploymentStatus(EmploymentStatusCategories.CONTRACTUAL_EMPLOYEE.toString());
			employeeProfile13.setBillingStartDate(new GregorianCalendar(2010,11,10));
			employeeProfile13.setBackgroundCheck(new GregorianCalendar(2010,11,10));
			employeeProfile13.setEmployeeCurrentState(EmployeeCurrentState.WORKING_FOR_CLIENT.toString());
			employeeProfile13.setStartWorking(new GregorianCalendar(2010,11,06));
			employeeProfile13.setWorkLifeLine(new GregorianCalendar(2010,11,06));
			employee13.setEmployeeProfil(employeeProfile13);

			EmployeeProfile employeeProfile14 = new EmployeeProfile();
			employeeProfile14.setEmployee(employee14);
			employeeProfile14.setApprover(null);
			employeeProfile14.setClient(null);
			employeeProfile14.setBusinessUnit(null);
			employeeProfile14.setEmail(null);
			employeeProfile14.setPositions(null);
			employeeProfile14.setEmploymentStatus(null);
			employeeProfile14.setBillingStartDate(null);
			employeeProfile14.setBackgroundCheck(null);
			employeeProfile14.setEmployeeCurrentState(EmployeeCurrentState.NOT_EMPLOYED.toString());
			employeeProfile14.setStartWorking(null);
			employeeProfile14.setWorkLifeLine(null);
			employee14.setEmployeeProfil(employeeProfile14);
			
			EmployeeProfile employeeProfile15 = new EmployeeProfile();
			employeeProfile15.setEmployee(employee15);
			employeeProfile15.setApprover(null);
			employeeProfile15.setClient(client2);
			employeeProfile15.setBusinessUnit(businessUnit3);
			employeeProfile15.setEmail(employee15.getEmail());
			employeeProfile15.setPositions(position4);
			employeeProfile15.setEmploymentStatus(EmploymentStatusCategories.CONTRACTUAL_EMPLOYEE.toString());
			employeeProfile15.setBillingStartDate(new GregorianCalendar(2009,06,06));
			employeeProfile15.setBackgroundCheck(new GregorianCalendar(2009,06,06));
			employeeProfile15.setEmployeeCurrentState(EmployeeCurrentState.WORKING_FOR_CLIENT.toString());
			employeeProfile15.setStartWorking(new GregorianCalendar(2009,6,13));
			employeeProfile15.setWorkLifeLine(new GregorianCalendar(2009,6,13));
			employee15.setEmployeeProfil(employeeProfile15);
			
			
			// approver profiles
			EmployeeProfile approverProfile1 = new EmployeeProfile();
			approverProfile1.setEmployee(null);
			approverProfile1.setApprover(approver1);
			approverProfile1.setClient(client1);
			approverProfile1.setBusinessUnit(businessUnit1);
			approverProfile1.setEmail(approver1.getEmail());
			approverProfile1.setPositions(position1);
			approverProfile1.setEmploymentStatus(EmploymentStatusCategories.EMPLOYMENT_CONTRACT.toString());
			approverProfile1.setBillingStartDate(new GregorianCalendar(2012,05,10));
			approverProfile1.setBackgroundCheck(new GregorianCalendar(2012,07,24));
			approverProfile1.setEmployeeCurrentState(EmployeeCurrentState.WORKING_FOR_CLIENT.toString());
			approverProfile1.setStartWorking(new GregorianCalendar(2012,04,01));
			approverProfile1.setWorkLifeLine(new GregorianCalendar(2012,05,21));
			approver1.setApproverProfile(approverProfile1);

			EmployeeProfile approverProfile2 = new EmployeeProfile();
			approverProfile2.setEmployee(null);
			approverProfile2.setApprover(approver2);
			approverProfile2.setClient(client1);
			approverProfile2.setBusinessUnit(businessUnit1);
			approverProfile2.setEmail(approver2.getEmail());
			approverProfile2.setPositions(position2);
			approverProfile2.setEmploymentStatus(EmploymentStatusCategories.EMPLOYMENT_CONTRACT.toString());
			approverProfile2.setBillingStartDate(new GregorianCalendar(2012,04,10));
			approverProfile2.setBackgroundCheck(new GregorianCalendar(2012,06,24));
			approverProfile2.setEmployeeCurrentState(EmployeeCurrentState.WORKING_FOR_CLIENT.toString());
			approverProfile2.setStartWorking(new GregorianCalendar(2012,04,01));
			approverProfile2.setWorkLifeLine(new GregorianCalendar(2012,05,10));
			approver2.setApproverProfile(approverProfile2);
			
			EmployeeProfile approverProfile3 = new EmployeeProfile();
			approverProfile3.setEmployee(null);
			approverProfile3.setApprover(approver3);
			approverProfile3.setClient(client1);
			approverProfile3.setBusinessUnit(businessUnit2);
			approverProfile3.setEmail(approver3.getEmail());
			approverProfile3.setPositions(position3);
			approverProfile3.setEmploymentStatus(EmploymentStatusCategories.EMPLOYMENT_CONTRACT.toString());
			approverProfile3.setBillingStartDate(new GregorianCalendar(2013,01,04));
			approverProfile3.setBackgroundCheck(new GregorianCalendar(2013,01,04));
			approverProfile3.setEmployeeCurrentState(EmployeeCurrentState.WORKING_FOR_CLIENT.toString());
			approverProfile3.setStartWorking(new GregorianCalendar(2013,01,02));
			approverProfile3.setWorkLifeLine(new GregorianCalendar(2013,01,02));
			approver3.setApproverProfile(approverProfile3);
			
			EmployeeProfile approverProfile4 = new EmployeeProfile();
			approverProfile4.setEmployee(null);
			approverProfile4.setApprover(approver4);
			approverProfile4.setClient(client2);
			approverProfile4.setBusinessUnit(businessUnit3);
			approverProfile4.setEmail(approver4.getEmail());
			approverProfile4.setPositions(position3);
			approverProfile4.setEmploymentStatus(EmploymentStatusCategories.EMPLOYMENT_CONTRACT.toString());
			approverProfile4.setBillingStartDate(new GregorianCalendar(2013,00,02));
			approverProfile4.setBackgroundCheck(new GregorianCalendar(2013,00,02));
			approverProfile4.setEmployeeCurrentState(EmployeeCurrentState.WORKING_FOR_CLIENT.toString());
			approverProfile4.setStartWorking(new GregorianCalendar(2013,00,02));
			approverProfile4.setWorkLifeLine(new GregorianCalendar(2013,00,02));
			approver4.setApproverProfile(approverProfile4);
			
			

			hibernateSession.save(employeeProfile1);
			hibernateSession.save(employeeProfile2);
			hibernateSession.save(employeeProfile3);
			hibernateSession.save(employeeProfile4);
			hibernateSession.save(employeeProfile5);
			hibernateSession.save(employeeProfile6);
			hibernateSession.save(employeeProfile7);
			hibernateSession.save(employeeProfile8);
			hibernateSession.save(employeeProfile9);
			hibernateSession.save(employeeProfile10);
			hibernateSession.save(employeeProfile11);
			hibernateSession.save(employeeProfile12);
			hibernateSession.save(employeeProfile13);
			hibernateSession.save(employeeProfile14);
			hibernateSession.save(employeeProfile15);
			hibernateSession.save(employee1);
			hibernateSession.save(employee2);
			hibernateSession.save(employee3);
			hibernateSession.save(employee4);
			hibernateSession.save(employee5);
			hibernateSession.save(employee6);
			hibernateSession.save(employee7);
			hibernateSession.save(employee8);
			hibernateSession.save(employee9);
			hibernateSession.save(employee10);
			hibernateSession.save(employee11);
			hibernateSession.save(employee12);
			hibernateSession.save(employee13);
			hibernateSession.save(employee14);
			hibernateSession.save(employee15);
			hibernateSession.save(approver1);
			hibernateSession.save(approver2);
			hibernateSession.save(approver3);
			hibernateSession.save(approver4);
			/*
			 * END OF -------------- EMPLOYEE ACCOUNTING PERIOD + EMPLOYEE
			 */

			
			
			/*
			 * APPROVER
			 */
			approver1.getEmployees().add(employee1);
			approver1.getEmployees().add(employee2);

			approver2.getEmployees().add(employee3);
			approver2.getEmployees().add(employee4);
			approver2.getEmployees().add(employee5);
			approver2.getEmployees().add(employee6);
			approver2.getEmployees().add(employee7);

			approver3.getEmployees().add(employee9);
			approver3.getEmployees().add(employee10);

			approver4.getEmployees().add(employee11);
			approver4.getEmployees().add(employee13);
			approver4.getEmployees().add(employee15);
			
			hibernateSession.save(approver1);
			hibernateSession.save(approver2);
			hibernateSession.save(approver3);
			hibernateSession.save(approver4);
			/*
			 * END OF -------------- APPROVER
			 */
			
			/*
			 * CLIENT + CLIENT PROFILE
			 */
			
			ClientProfile clientProfile1 = new ClientProfile();
			clientProfile1.setClient(client1);
			clientProfile1.getClientAdmin().add(clientAdmin1);
			clientProfile1.getClientCategories().add(clientCatBusinessTrip);
			clientProfile1.getClientCategories().add(clientCatContractorTimeOff);
			clientProfile1.getClientCategories().add(clientCatNormalTime);
			clientProfile1.getClientCategories().add(clientCatOverTime);
			clientProfile1.getClientCategories().add(clientCatTraining);
			clientProfile1.setSendMailRemainder(new GregorianCalendar(2013,8,25));
			clientProfile1.setDeadlineToCloseAccountingPeriod(new GregorianCalendar(2013,8,31));
			client1.setClientProfil(clientProfile1);

			ClientProfile clientProfile2 = new ClientProfile();
			clientProfile2.setClient(client2);
			clientProfile2.getClientAdmin().add(clientAdmin1);
			clientProfile2.getClientAdmin().add(clientAdmin2);
			clientProfile2.getClientCategories().add(clientCatBusinessTrip);
			clientProfile2.getClientCategories().add(clientCatContractorTimeOff);
			clientProfile2.getClientCategories().add(clientCatNormalTime);
			clientProfile2.getClientCategories().add(clientCatOverTime);
			clientProfile2.getClientCategories().add(clientCatTraining);
			clientProfile2.setSendMailRemainder(new GregorianCalendar(2013,8,25));
			clientProfile2.setDeadlineToCloseAccountingPeriod(new GregorianCalendar(2013,8,31));
			client2.setClientProfil(clientProfile2);

			hibernateSession.save(clientProfile1);
			hibernateSession.save(clientProfile2);
			hibernateSession.save(client1);
			hibernateSession.save(client2);
			/*
			 * END OF -------------- CLIENT ADMIN
			 */
			
			hibernateSession.getTransaction().commit();
		}
}

